{% extends 'basemodel.html' %}
{% import '_macros.html' as macros %}

{% block content %}
<!--Message List-->
<div class="container">
    {% for i in passage_info %}
    <div class="row">
        <div class="col">
            <a href="{{url_for('passagesview.view_the_passage',passage_name=i.passage_name)}}">
                <div class="card border hvr-grow">
                    <div class="card-body bg-light">
                        <ul class="navbar-nav nav-pills mr-auto list-group-horizontal">
                            <li class="nav-item">
                                <h4 class="card-title">{{i.passage_name}}</h4>
                            </li>
                        </ul>
                        <ul class="navbar-nav nav-pills list-group-horizontal">
                            <li class="nav-item">
                                <a class="btn btn-primary" href="{{url_for('passagesview.change_passage',passageid=i.passage_id, userid=current_user.user_id)}}" role="button">修改文章</a>
                            </li>
                            <li class="nav-item">
                                <a class="btn btn-primary" href="{{url_for('passagesview.delect_passage',passageid=i.passage_id, userid=current_user.user_id)}}" role="button">删除文章</a>
                            </li>
                        </ul>
                        <p class="card-text">{{i.passage_somesource}}</p>
                    </div>
                </div>
            </a>
        </div>
    </div>
    {% endfor %}

    <div class="row">
        <div class="col">
            {{macros.pagination_list(pagination, endpoint)}}
        </div>
    </div>
</div>
{% endblock %}